package com.mikasa.springboot.example.elasticsearch;

import com.mikasa.springboot.example.domain.elasticsearch.Post;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

import java.util.List;

/**
 * Created by sherlock on 16/9/21.
 */
public interface PostRepository extends ElasticsearchRepository<Post, String> {

    List<Post> findByTag(String tag);

    List<Post> findByRatingBetween(Integer beginning, Integer end);

    List<Post> findByTitle(String title);

}
